/*
 * comms.h
 *
 *  Created on: Mar 11, 2011
 *      Author: B. Jones
 */

#ifndef COMMS_H_
#define COMMS_H_

#include <cstring>
#include <vector>
#include "channelManager.h"
#include "theEncryptor.h"
#include "fileTransferer.h"
#include "com_params.h"
#include "peer_info.h"


class comms
{
public:
	comms();
	virtual void startServerThread(int port){}
	virtual void startClientThread(const char *hostname, int portno){}
	void sendMessage(std::string str);
	//void setCharNick(const char *charNick_);
	void initiateChannelManager();
	void doFileTransfer(const char* filePath, const char* filename);
	void doFileReceive(const char* filePath, bool yesno);
	void pushEvent();
	void sendNick(std::string charNick, com_params &cp);

	std::string peerNick;
	static theEncryptor* encryptor;
	static fileTransferer* ft;
	std::string charNick;

	int pid;

	int link_id;

	channelManager *cm;




	static std::vector<com_params> all_com_params;
	static std::vector<peer_info> all_peer_infos;

};


#endif /* COMMS_H_ */
